package net.bolue.sysmng.tblbean;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * 数据维护资源映射
 * @author Administrator
 *
 */
public class DbopResMap extends TableBean{

	/**
	 * 子系统
	 */
	private String subsys;
	
	/**
	 * 报表标识
	 */
	private Integer repId;
	
	/**
	 * 维护类型
	 * 1:批量更新
	 * 2：新增
	 * 3:批量删除
	 * 4:更新
	 */
	private Integer dbopType;
	
	/**
	 * 资源标识
	 */
	private String resId;
	
	/**
	 * 备注
	 */
	private String remark;
	
	public String getSubsys() {
		return subsys;
	}

	public void setSubsys(String subsys) {
		this.subsys = subsys;
	}

	public Integer getRepId() {
		return repId;
	}

	public void setRepId(Integer repId) {
		this.repId = repId;
	}

	public Integer getDbopType() {
		return dbopType;
	}

	public void setDbopType(Integer dbopType) {
		this.dbopType = dbopType;
	}

	public String getResId() {
		return resId;
	}

	public void setResId(String resId) {
		this.resId = resId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public TableBean mapToEntry(Map<String, Object> map) {
		DbopResMap dbopResMap = new DbopResMap();
		Set<String> keySet = map.keySet();
		Iterator<String> keyIt = keySet.iterator();
		while(keyIt.hasNext()){
			String key = keyIt.next();
			Object o = map.get(key);
			if("SUBSYS".equals(key)){
				dbopResMap.setSubsys((String)o);
			} else if("REPID".equals(key)){
				dbopResMap.setRepId((Integer)o);
			} else if("DBOPTYPE".equals(key)){
				dbopResMap.setDbopType((Integer)o);
			} else if("RESID".equals(key)){
				dbopResMap.setResId((String)o);
			} else if("REMARK".equals(key)){
				dbopResMap.setRemark((String)o);
			}
		}
		return dbopResMap;
	}

	@Override
	public String keyProps() {
		return "SUBSYS,REPID,DBOPTYPE";
	}

}
